﻿using System;

//using Halk.Model;
namespace Halk.Config
{
    public class AppCache
    {
        private static AppCache _appCahce;

        public static AppCache Instace()
        {
            return _appCahce ?? (_appCahce = new AppCache());
        }

        private int _maxArticleId;

        public int MaxArticleId
        {
            get
            {
                _maxArticleId++;
                return _maxArticleId;
            }
            set
            {
                _maxArticleId = value;
            }
        }

        private int _maxChapterId;

        public int MaxChapterId
        {
            get
            {
                _maxChapterId++;
                return _maxChapterId;
            }
            set { _maxChapterId = value; }
        }

        private int _maxAttachId;

        public int MaxAttachId
        {
            get
            {
                _maxAttachId++;
                return _maxAttachId;
            }
            set { _maxAttachId = value; }
        }

        public int GetDateTime()
        {
            return int.Parse(DateTime.Now.ToString("yyMMddHHmm"));
        }

        public int RepeatTimes { get; set; }

        //public bool GetOnOff()
        //{
        //    return SystemManage.Instace().GetOnOff();
        //}

        //private Dictionary<string, SysWebInfo> _dicSysWebs;

        //public void LoadSysWebs()
        //{
        //    if (_dicSysWebs == null)
        //        _dicSysWebs = new Dictionary<string, SysWebInfo>();
        //}
    }
}
